process softirqs while dumping domains
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 31 Oct 2014 10:28:36 +0000 (11:28 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 31 Oct 2014 10:28:36 +0000 (11:28 +0100)
Process softirqs once per domain, and once every 64 vcpus in a guest to avoid
being hit by the NMI watchdog.  Discovered against a VM which had accidentally
been assigned 8192 vcpus.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
xen/common/keyhandler.c

index 809378c2a512ea2ef9339f4495934612dac77096..a91772680e11d03c945171027bbc64ae709af433 100644 (file)
@@ -253,6 +253,9 @@ static void dump_domains(unsigned char key)
     for_each_domain ( d )
     {
         unsigned int i;
+
+        process_pending_softirqs();
+
         printk("General information for domain %u:\n", d->domain_id);
         cpuset_print(tmpstr, sizeof(tmpstr), d->domain_dirty_cpumask);
         printk("    refcnt=%d dying=%d pause_count=%d\n",
@@ -287,6 +290,9 @@ static void dump_domains(unsigned char key)
                d->domain_id);
         for_each_vcpu ( d, v )
         {
+            if ( !(v->vcpu_id & 0x3f) )
+                process_pending_softirqs();
+
             printk("    VCPU%d: CPU%d [has=%c] poll=%d "
                    "upcall_pend = %02x, upcall_mask = %02x ",
                    v->vcpu_id, v->processor,
@@ -311,6 +317,9 @@ static void dump_domains(unsigned char key)
     {
         for_each_vcpu ( d, v )
         {
+            if ( !(v->vcpu_id & 0x3f) )
+                process_pending_softirqs();
+
             printk("Notifying guest %d:%d (virq %d, port %d)\n",
                    d->domain_id, v->vcpu_id,
                    VIRQ_DEBUG, v->virq_to_evtchn[VIRQ_DEBUG]);